<?php

class PhpFox_Mod_Video_ComponentCategories extends BaseComponent
{
    function process()
    {
    	App::checkUserAccess('video', array('full', 'read_only'));
    
		$aItems = $this->oDatabase->getRows("SELECT l.list_id, l.list_name, v.vid_id, v.vid_title, v.vid_time FROM
			". App::getT('videos_list') ." AS l
			LEFT JOIN ". App::getT('videos') ." AS v ON(l.list_id = v.vid_list_id AND v.featured = '1')
			GROUP BY l.list_name
			ORDER BY l.list_name ASC");

		$this->oTpl->assign(array
		(
			'sGImageUrl' => App::getParam('video.image.url'),
			'aItems' => $aItems,
		));

		return $this->oTpl->fetch('Categories.html');
    }
}

?>